package com.aaron.utils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
import java.util.logging.Logger;

import org.apache.commons.collections.map.HashedMap;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;

import com.aaron.i18n.bean.AccountBean;
import com.aaron.spring.jdbc.JdbcTemplateUtils;
import com.aaron.spring.jdbc.JdbcTemplateUtilsImpl;
import com.aaron.startup.SpringStartup;
import com.aaron.utils.json.JSONUtils;

public class TestUtils
{

    /**
     * 日志对象
     */
    private final static Logger logger = Logger.getLogger(SpringStartup.class
            .getName());

    public static void main(String[] args)
    {
        // TODO Auto-generated method stub

        Map<String, String> map = new HashMap<String, String>();
        map.put("1", "1");
        map.put("2", "2");
        map.put("3", "3");
        map.put("4", "4");
        
        List<Map<String, String>> list = new ArrayList<Map<String, String>>();

        list.add(map);
        JSONUtils<String, String> json = new JSONUtils<String, String>();
        JSONObject jsonObject = json.fromateObject(map, null);
        JSONArray jsonArray = json.fromateArray(list, null);

        logger.info(jsonObject.toString());
        logger.info(jsonArray.toString());
    }
}